<?php

var_dump($_POST);
//对接收到的数据进行处理



function process() {
if (isset($_POST['stuname']) && isset($_POST['stunumber']) && isset($_POST['class']) && isset($_POST['stuurl'])) {

return true;
}
}

var_dump(process());
//存储数据到数据库





//连接到数据库

$abc = mysqli_connect('localhost', 'root', 'root', 'stuinfo');



//设定连接器的编码规则

mysqli_set_charset($abc, 'utf8mb4');



//拼接sql语句

//INSERT INTO info (column4, column8) VALUES (valueX, valueY)

$sql = "INSERT INTO info (name, class, no, giturl) VALUES ('" . $_POST['stuname'] . "','" . $_POST['class'] . "','" . $_POST['stunumber'] . "','" . $_POST['stuurl'] ."')";



//执行查询

$r = mysqli_query($abc, $query)



//释放资源

mysqli_free_result ($result)

mysqli_close($abc)
echo "<pre>";
var_dump($query,$r);
echo "/<pre>";
?>